package com.xing.binbackend.http;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class RestfulParameters {
    private Map<String, String> headerMap;
    private Map<String, String> paramMap;
    private Object body; // 用于POST和PUT请求

    public RestfulParameters() {
        this.headerMap = new HashMap<>();
        this.paramMap = new HashMap<>();
    }

    // 添加单个头部信息
    public void addHeader(String key, String value) {
        this.headerMap.put(key, value);
    }

    // 添加单个参数
    public void addParam(String key, String value) {
        this.paramMap.put(key, value);
    }
}
